This scenario verifies that subject visibility includes the group subjects of other organizations in which the same natural person also holds a user account. Because the person behind the current account also has an account in organization “abc”, the current account can see the groups of organization “abc”, such as “/abc-Team”.
Account: xyz-peter.smith from 9310:
Create Account and User Subject From Given Subject Uuid and
Name| name | value |
|---|---|
| thePersonsFamilyName | Smith |
| thePersonsGivenName | Peter |
| nameOfAssociatedGroupSubjectFromAnotherOrg | /abc-Team |
| theAccountSubjectName | abc-peter.smith |
HTTP GET "/api/hs/office/persons?name=Smith&type=NATURAL_PERSON" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }`
=> status: 200 OK
[ {
"uuid" : "bfecf1fc-b92b-47ae-aa84-9d52b57457ef", // Person: Peter Smith
"personType" : "NATURAL_PERSON",
"tradeName" : null,
"salutation" : null,
"title" : null,
"givenName" : "Peter",
"familyName" : "Smith"
} ]
In production, this lookup would need a more precise selector.
HTTP POST "/api/rbac/subjects" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }` \
-H 'Content-Type: application/json' \
--data-binary @- <<EOF
{
"name" : "/abc-Team",
"type" : "GROUP"
}
EOF
=> status: 201 CREATED 05cd4947-fa73-4b7f-af65-3ed95e4d618c
HTTP POST "/api/hs/accounts/accounts" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }` \
-H 'Content-Type: application/json' \
--data-binary @- <<EOF
{
"person.uuid" : "bfecf1fc-b92b-47ae-aa84-9d52b57457ef", // Person: Peter Smith
"subject" : {
"uuid" : "242a0005-0000-0000-0000-000000000005",
"name" : "abc-peter.smith"
},
"globalUid" : 21013,
"globalGid" : 21013
}
EOF
=> status: 201 CREATED 242a0005-0000-0000-0000-000000000005
HTTP GET "/api/rbac/context" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<abc-peter.smith>",` \
`# "groups" : [` \
`# "/abc-Team"` \
`# ]` \
`# }`
=> status: 200 OK
{
"subject" : {
"uuid" : "242a0005-0000-0000-0000-000000000005",
"name" : "abc-peter.smith",
"type" : "USER"
},
"assumedRoles" : [ ],
"claimedGroups" : [ "/abc-Team" ],
"effectiveGroups" : [ {
"uuid" : "05cd4947-fa73-4b7f-af65-3ed95e4d618c",
"name" : "/abc-Team"
} ],
"globalAdmin" : false
}
HTTP GET "/api/rbac/subjects" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<xyz-peter.smith>"` \
`# }`
=> status: 200 OK
[ {
"uuid" : "05cd4947-fa73-4b7f-af65-3ed95e4d618c",
"name" : "/abc-Team",
"type" : "GROUP"
}, {
"uuid" : "242a0001-0000-0000-0000-000000000001", // theAccount
"name" : "xyz-jack.tucker",
"type" : "USER"
}, {
"uuid" : "242a0003-0000-0000-0000-000000000003", // Account: xyz-peter.newman
"name" : "xyz-peter.newman",
"type" : "USER"
}, {
"uuid" : "242a0002-0000-0000-0000-000000000002", // Account: xyz-peter.smith
"name" : "xyz-peter.smith",
"type" : "USER"
}, {
"uuid" : "0c6b921a-0ba0-59a6-98d5-26b8727f274b",
"name" : "/xyz-Service",
"type" : "GROUP"
}, {
"uuid" : "a366695d-3abc-5197-82ff-31090bd8c314",
"name" : "/xyz-Team",
"type" : "GROUP"
}, {
"uuid" : "242a0004-0000-0000-0000-000000000004", // Account: xyz-tom.sawyer
"name" : "xyz-tom.sawyer",
"type" : "USER"
} ]
generated on 2026-07-17 01:42:21 for branch